1ca70ea80892d70c19793f53e57dc37b8b23afe0,test/ca/odell/glazedlists/UniqueListTest.java,UniqueListTest,testLargeRandomSet,#,678

Before Change


     * Tests a large set of random events.
     */
    public void testLargeRandomSet() {
        source = new BasicEventList<Object>();
        IntegerArrayMatcherEditor matcherEditor = new IntegerArrayMatcherEditor(0, 0);
        FilterList filterList = new FilterList(source, matcherEditor);
        unique = new UniqueList(filterList, GlazedListsTests.intArrayComparator(0));

        // populate a list with 1000 random arrays between 0 and 1000
        for(int i = 0; i < 1000; i++) {

After Change


     * Tests a large set of random events.
     */
    public void testLargeRandomSet() {
        BasicEventList<int[]> sourceList = new BasicEventList<int[]>();
        IntegerArrayMatcherEditor matcherEditor = new IntegerArrayMatcherEditor(0, 0);
        FilterList<int[]> filterList = new FilterList<int[]>(sourceList, matcherEditor);
        UniqueList<int[]> uniqueList = new UniqueList<int[]>(filterList, GlazedListsTests.intArrayComparator(0));

        // populate a list with 1000 random arrays between 0 and 1000
        for(int i = 0; i < 1000; i++) {
            int value = random.nextInt(1000);
            int[] array = new int[] { value, random.nextInt(2), random.nextInt(2), random.nextInt(2) };
            sourceList.add(array);
        }

        // try ten different filters
        for(int i = 0; i < 10; i++) {
            // apply the filter
            int filterColumn = random.nextInt(3);
            matcherEditor.setFilter(filterColumn + 1, 1);

            // construct the control list
            SortedSet<int[]> controlSet = new TreeSet<int[]>(GlazedListsTests.intArrayComparator(0));
            controlSet.addAll(filterList);
            List<int[]> controlList = new ArrayList<int[]>();
            controlList.addAll(controlSet);